/* Buttons */

%button {
  @include button(normal);
  &:focus { @include button(focus); }
  &:hover { @include button(hover); }
  &:active { @include button(active); }
  &:insensitive { @include button(insensitive); }
}

%flat_button {
  @include button(flat-normal);
  &:focus { @include button(flat-focus); }
  &:hover { @include button(flat-hover); }
  &:active { @include button(flat-active); }
  &:insensitive { @include button(flat-insensitive); }
}

.button {
  min-height: to_em(22px);
  padding: $scaled_padding $scaled_padding * 2;
  border-radius: $base_radius;
  border: none;
  @extend %button;

  .popup-menu & {
    @extend %flat_button;
  }
}

.icon-button {
  min-height: $scalable_icon_size;
  min-width: $scalable_icon_size;
  padding: $scaled_padding * 2;
  border-radius: $circular_radius;
  @extend %flat_button;

  StIcon {
    icon-size: $scalable_icon_size;
    -st-icon-style: symbolic;
  }
}

// buttons on OSD elements
// that are undecorated by default and use OSD colors
%osd_button {
  @include button(flat-normal, $tc:on($osd));
  &:insensitive { @include button(insensitive, $tc:on($osd), $bc:$osd); }
  &:focus { @include button(focus, $tc:on($osd), $bc:$osd);}
  &:hover { @include button(hover, $tc:on($osd), $bc:$osd);}
  &:active { @include button(active, $tc:on($osd), $bc:$osd);}
  &:checked { @include button(checked, $tc:on($osd), $bc:$osd);}
  &:outlined, &:checked { @include button(checked, $tc:on($osd), $bc:$osd);}
}
